package com.houweishi.module.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.houweishi.module.purchase.mapper.OaPurchaseProductMapper;
import com.houweishi.module.purchase.domain.OaPurchaseProduct;
import com.houweishi.module.purchase.service.IOaPurchaseProductService;

/**
 * 采购申请产品Service业务层处理
 * 
 * @author houweishi
 * @date 2023-03-27
 */
@Service
public class OaPurchaseProductServiceImpl implements IOaPurchaseProductService 
{
    @Autowired
    private OaPurchaseProductMapper oaPurchaseProductMapper;

    /**
     * 查询采购申请产品
     * 
     * @param id 采购申请产品主键
     * @return 采购申请产品
     */
    @Override
    public OaPurchaseProduct selectOaPurchaseProductById(Long id)
    {
        return oaPurchaseProductMapper.selectOaPurchaseProductById(id);
    }

    /**
     * 查询采购申请产品列表
     * 
     * @param oaPurchaseProduct 采购申请产品
     * @return 采购申请产品
     */
    @Override
    public List<OaPurchaseProduct> selectOaPurchaseProductList(OaPurchaseProduct oaPurchaseProduct)
    {
        return oaPurchaseProductMapper.selectOaPurchaseProductList(oaPurchaseProduct);
    }

    /**
     * 新增采购申请产品
     * 
     * @param oaPurchaseProduct 采购申请产品
     * @return 结果
     */
    @Override
    public int insertOaPurchaseProduct(OaPurchaseProduct oaPurchaseProduct)
    {
        return oaPurchaseProductMapper.insertOaPurchaseProduct(oaPurchaseProduct);
    }

    /**
     * 修改采购申请产品
     * 
     * @param oaPurchaseProduct 采购申请产品
     * @return 结果
     */
    @Override
    public int updateOaPurchaseProduct(OaPurchaseProduct oaPurchaseProduct)
    {
        return oaPurchaseProductMapper.updateOaPurchaseProduct(oaPurchaseProduct);
    }

    /**
     * 批量删除采购申请产品
     * 
     * @param ids 需要删除的采购申请产品主键
     * @return 结果
     */
    @Override
    public int deleteOaPurchaseProductByIds(Long[] ids)
    {
        return oaPurchaseProductMapper.deleteOaPurchaseProductByIds(ids);
    }

    /**
     * 删除采购申请产品信息
     * 
     * @param id 采购申请产品主键
     * @return 结果
     */
    @Override
    public int deleteOaPurchaseProductById(Long id)
    {
        return oaPurchaseProductMapper.deleteOaPurchaseProductById(id);
    }
}
